#include <string>
#include <iostream>
#include <unistd.h>
#include "./../../source/server.hpp"

int main()
{
    Socket cli;
    cli.ClinetCreate("127.0.0.1", 8181);
    std::string msg("hello!");
    for (int i = 0; i < 5; ++i)
    {
        cli.Send(msg.c_str(), msg.size());
        // char buff[1024] = { 0 };
        // ssize_t n = cli.Recv(buff, 1023);
        // if (n <= 0) { std::cerr << "client recv err" << std::endl; return -1; }
        // buff[n] = 0;
        // std::cout << buff << std::endl;
        sleep(1);
    }
    while (true) { sleep(1); }
    return 0;
}